import { request } from "@/utils/service"
// 后台用户管理
export function getDepartmentList(params: any) {
  return request({
    url: "/bg/admin/getList",
    method: "get",
    params
  })
}
//根据id查询用户
export function getAdminById(params: any) {
  return request({
    url: "/bg/admin/getAdminById",
    method: "get",
    params
  })
}

//根据id删除
export function deleteAdminById(data: any) {
    return request({
      url: "/bg/admin/deleteById",
      method: "post",
      data
    })
}

//下载导入模板
export function downloadAdminImportTemplate(data: any) {
    return request({
      url: "/bg/admin/downloadImportTemplate",
      method: "post",
      data
    })
}

// 导入员工
export function importAdmin(data: any) {
    return request({
      url: "/bg/admin/importAdmin",
      method: "post",
      data
    })
}

// 重置密码
export function resetPassword(data: any) {
    return request({
      url: "/bg/admin/resetPassword",
      method: "post",
      data
    })
}

// 保存-修改
export function saveOrUpdateAdmin(data: any) {
    return request({
      url: "/bg/admin/saveOrUpdate",
      method: "post",
      data
    })
}

// 修改密码
export function updatePassword(data: any) {
    return request({
      url: "/bg/admin/updatePassword",
      method: "post",
      data
    })
}

// 修改状态
export function updateStatus(data: any) {
    return request({
      url: "/bg/admin/updateStatus",
      method: "post",
      data
    })
}